//    Copyright (C) Kherty.  All rights reserved.
using System;
using OpenLS.Core.Serialization;
using OpenLS.Drawing.Serialization;

namespace OpenLS.Drawing.Diagram
{
    internal class WholeE2oFormatting : IOfficeXmlSerializable
    {
        private EffectProperties _effectProperties;
        private LineProperties _ln;

        public void ReadXml(ReadContext context)
        {
            using (var c = context.ReadAndSwitch("whole", DrawingConstants.DrawingNamespaceUri, false))
            {
                _ln = c.ReadOptionalElement<LineProperties>("ln");
                this._effectProperties = EffectProperties.ReadEffectProperties(c);
            }

        }

        public void WriteXml(WriteContext context)
        {
            using (var c = context.WriteAndSwitch("whole", DrawingConstants.DrawingNamespace))
            {
                c.WriteOptionalElement(_ln);
                c.WriteOptionalElement(_effectProperties);
            }
        }
    }
}